<!DOCTYPE html>

<html class="no-js">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title></title>
  <meta name="description" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <script src="https://cdn.staticfile.org/axios/0.19.0-beta.1/axios.js"></script>
  <script src="../../cdn/vue/vue.global.min.js"></script>
  <link rel="stylesheet" href="../../cdn/element-plus/index.css" />
  <script src="../../cdn/element-plus/index.full.min.js"></script>
  <link rel="stylesheet" href="https://cdn.staticfile.org/animate.css/3.7.0/animate.min.css" />
  <link rel="stylesheet" href="../../../lib/index.css" />
  <script src="../../../lib/avue.js"></script>

</head>

<body>
  <div id="app">
    <avue-sign ref="sign"></avue-sign>
    <el-button type="primary" @click="handleSubmit">生成</el-button>
    <el-button type="primary" @click="$refs.sign.getStar('这里是用途','这里是单位的名称','1221332')">印章</el-button>
    <el-button @click="$refs.sign.clear()">清空</el-button>
    <div>
      结果
      <img :src="img" alt="" width="80" height="50" />
    </div>

  </div>
</body>
<script>
  var app = Vue.createApp({
    data() {
      return {
        img: ''
      }
    },
    methods: {
      handleSubmit() {
        this.img = this.$refs.sign.submit(80, 50);
        console.log(this.img)
      }
    }
  })
  app.use(ElementPlus)
  app.use(AVUE)
  app.mount('#app')
</script>

</html>